<?php

require_once "DBConnection.php";

$company = $_GET['company'];

$connection = new Connection();

$query = "SELECT *
        FROM workertrack.company
		WHERE comp_name like '$company%';";

$result = $connection->execute_query($query);	//result gets the info from the DB

//$userData = mysql_fetch_array($result, MYSQL_ASSOC);
//$row = mysql_fetch_array($result, MYSQL_ASSOC);
while ($row = mysql_fetch_row($result))
{
    echo "<br>";
	echo $row['1'];
    echo "<br>";
    echo $row['2'];
    echo "<br>";
}

$connection->close_connection();

?>